package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.business.dto.response.OrderDealerPaymentBizDto;
import com.molichuxing.services.infrastructure.bean.OrderDealerDeliveryBean;
import com.molichuxing.services.infrastructure.dto.request.modify.DeliverySlipModifyDto;
import com.molichuxing.services.infrastructure.dto.request.modify.OrderDealerStartStatusModifyDto;
import com.molichuxing.services.infrastructure.dto.request.modify.RefuseModifyFto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderDealerDeliveryMapper extends RootMapper<OrderDealerDeliveryBean> {


    List<Integer> getCarIdsByOrderCode(Long orderCode);

    List<OrderDealerDeliveryBean> getCarInfoByOrderCode(Long orderCode);

    List<OrderDealerDeliveryBean> getCatStartByOrderCode(@Param("orderCode") Long orderCode,@Param("carStatus") Integer carStatus);

    int updateCarStart(OrderDealerStartStatusModifyDto orderDealerStartStatusModifyDto);

    int updateCarRefuse(RefuseModifyFto refuseModifyFto);

    OrderDealerDeliveryBean selectOrderDealerDeliveryInfo(@Param("orderCode")Long orderCode,@Param("carId") Integer carId);

    int updateIsChangedByCarId(@Param("orderCode")Long orderCode,@Param("carId") Integer carId);

    int updateDeliverySlip(DeliverySlipModifyDto deliverySlipModifyDto);

    List<Integer> getSendStatusByOrderCode(Long orderCode);

    int getDetailStartDto(@Param("value")int value,@Param("orderCode") Long orderCode);

    Long getOrderCodeBycarId(Integer carId);

    OrderDealerDeliveryBean carIdCheck(Integer carId);

    List<OrderDealerPaymentBizDto> getOrderDealerPayment(@Param("list") List<Long> orderCodeList,@Param("carId") Integer carId);

    int modifyCarLock(Integer carId);

    /**
     * 根据车辆id查询收车时的已行驶里程
     * @param carId
     * @return
     */
    Integer getTotalMileageByCarId(Integer carId);
}